
        <f:view>
            <h:form>
            <rich:panel header="Compose message">
                <h:panelGrid columns="2">
                    <h:outputText value="(*) Required fields" /><br><br>
                    <h:panelGrid columns="2">
                        <h:outputText value="(*)" style="color: red"/>
                        <h:outputText value="Title: " />
                    </h:panelGrid>
                    <h:panelGrid columns="2">
                        <h:inputText  id="subject" value="#{ForumsSession.currentMessage.subject}" requiredMessage="This field is required." required="true" maxlength="60"/>
                        <h:message for="subject" style="color: red" styleClass="errorMessage" />
                    </h:panelGrid>
                    <h:outputText value="Handle: " />
                    <h:selectOneMenu value="#{ForumsSession.nickId}">
                        <c:forEach var="nick" items="#{sessionBean.ejbSession.owner.handles}">
                            <f:selectItem itemValue="#{nick.id}" itemLabel="#{nick.name}" />
                        </c:forEach>
                    </h:selectOneMenu>
                    <h:panelGrid columns="2">
                        <h:outputText value="(*)" style="color: red"/>
                        <h:outputText value="Body: " /> 
                    </h:panelGrid>
                    <h:panelGrid columns="2">
                        <h:inputTextarea id="content" requiredMessage="This field is required." required="true" value="#{ForumsSession.currentMessage.content}" rows="10" cols="30"  />
                        <h:message for="content" style="color: red" styleClass="errorMessage" />
                    </h:panelGrid>
                    <h:commandButton value="Preview" action="pMessage">
                    </h:commandButton>
                </h:panelGrid>
            </rich:panel>
        </h:form>
 </f:view>    

